package org.example.admin.config;

import com.zaxxer.hikari.HikariDataSource;
import org.noear.solon.annotation.Bean;
import org.noear.solon.annotation.Configuration;
import org.noear.solon.annotation.Inject;

import javax.sql.DataSource;

@Configuration
public class Config {
    @Bean(value = "db",typed = true)
    public DataSource db(@Inject("${url.db}")HikariDataSource ds){
        return ds;
    }

    //调整 db1 的配置，或添加插件
//    @Bean
//    public void db_cfg(@Db org.apache.ibatis.session.Configuration cfg) {
//        cfg.setCacheEnabled(false);
//    }
}
